package com.gpzx.zx.module.home.ui.adapter;

import android.content.Context;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.gpzx.zx.module.home.ui.fragment.HomeFragment;
import com.gpzx.zx.module.home.ui.fragment.News24Fragment;
import com.gpzx.zx.module.home.ui.fragment.QhNewsHomeFragment;
import com.gpzx.zx.module.home.ui.fragment.XnbFragment;


/**
 * 作者:吴奎庆
 * <p>
 * 时间:2019-12-21
 * <p>
 * 用途:
 */


public class NewHomePagerAdapter extends FragmentPagerAdapter {

    Context context;

    public NewHomePagerAdapter(Context context, @NonNull FragmentManager fm) {
        super(fm);
        this.context = context;
    }

    @NonNull
    @Override

    public Fragment getItem(int position) {

        Fragment fragment = null;
        return XnbFragment.Companion.newInstance();

//        switch (position) {
//            case 0:
//                fragment = XnbFragment.Companion.newInstance();
//
//                break;
//            case 1:
//                fragment = HomeFragment.Companion.newInstance();
//                break;
//
//        }
//
//        return fragment;
    }

    @Override
    public int getCount() {
        return 1;
    }
}
